class Company(object):
    def __init__(self,employee_list):
        self.employee=employee_list
    def __getitem__(self, item):#是类对象变成可迭代类型，可以直接for循环类对象
        return self.employee[item]#会把index传给item
    def __len__(self):
        return len(self.employee)

    def __str__(self):
        return ",".join(self.employee)

    def __repr__(self):
        return ",".join(self.employee)
company=Company(['tom','bob','jane'])
print(company.__dict__)
print(Company.__dict__)
company1=company[:2]
for em in company1:
    print(em)
print(company)